package cn.manyufun.myf.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created by Xiao on 2018-01-27.
 */

public class ComicsSummary implements Parcelable {
    private long ComicId;
    private String Title;
    private List<String> CoverImages;
    private float Score;
    private int CommentNum;
    private int FollowNum;
    private int ArticleNum;
    private int ViewNum;
    private String Author;
    private String UpdateInfo;
    private String BriefTitle;
    private String BriefContent;
    private List<String> ComicType;
    private boolean IsFollowed;
    public int position;

    protected ComicsSummary(Parcel in) {
        ComicId = in.readLong();
        Title = in.readString();
        CoverImages = in.createStringArrayList();
        Score = in.readFloat();
        CommentNum = in.readInt();
        FollowNum = in.readInt();
        ArticleNum = in.readInt();
        ViewNum = in.readInt();
        Author = in.readString();
        UpdateInfo = in.readString();
        BriefTitle = in.readString();
        BriefContent = in.readString();
        ComicType = in.createStringArrayList();
        IsFollowed = in.readByte() != 0;
        position = in.readInt();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(ComicId);
        dest.writeString(Title);
        dest.writeStringList(CoverImages);
        dest.writeFloat(Score);
        dest.writeInt(CommentNum);
        dest.writeInt(FollowNum);
        dest.writeInt(ArticleNum);
        dest.writeInt(ViewNum);
        dest.writeString(Author);
        dest.writeString(UpdateInfo);
        dest.writeString(BriefTitle);
        dest.writeString(BriefContent);
        dest.writeStringList(ComicType);
        dest.writeByte((byte) (IsFollowed ? 1 : 0));
        dest.writeInt(position);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<ComicsSummary> CREATOR = new Creator<ComicsSummary>() {
        @Override
        public ComicsSummary createFromParcel(Parcel in) {
            return new ComicsSummary(in);
        }

        @Override
        public ComicsSummary[] newArray(int size) {
            return new ComicsSummary[size];
        }
    };

    public long getComicId() {
        return ComicId;
    }

    public void setComicId(long comicId) {
        ComicId = comicId;
    }

    public String getTitle() {
        return Title;
    }

    public void setTitle(String title) {
        Title = title;
    }

    public List<String> getCoverImages() {
        return CoverImages;
    }

    public void setCoverImages(List<String> coverImages) {
        CoverImages = coverImages;
    }

    public float getScore() {
        return Score;
    }

    public void setScore(float score) {
        Score = score;
    }

    public int getCommentNum() {
        return CommentNum;
    }

    public void setCommentNum(int commentNum) {
        CommentNum = commentNum;
    }

    public int getFollowNum() {
        return FollowNum;
    }

    public void setFollowNum(int followNum) {
        FollowNum = followNum;
    }

    public int getArticleNum() {
        return ArticleNum;
    }

    public void setArticleNum(int articleNum) {
        ArticleNum = articleNum;
    }

    public int getViewNum() {
        return ViewNum;
    }

    public void setViewNum(int viewNum) {
        ViewNum = viewNum;
    }

    public String getAuthor() {
        return Author;
    }

    public void setAuthor(String author) {
        Author = author;
    }

    public String getBriefTitle() {
        return BriefTitle;
    }

    public void setBriefTitle(String briefTitle) {
        BriefTitle = briefTitle;
    }

    public String getBriefContent() {
        return BriefContent;
    }

    public void setBriefContent(String briefContent) {
        BriefContent = briefContent;
    }

    public List<String> getComicType() {
        return ComicType;
    }

    public void setComicType(List<String> comicType) {
        ComicType = comicType;
    }

    public boolean isFollowed() {
        return IsFollowed;
    }

    public void setFollowed(boolean followed) {
        IsFollowed = followed;
    }

    public String getUpdateInfo() {
        return UpdateInfo;
    }

    public void setUpdateInfo(String updateInfo) {
        UpdateInfo = updateInfo;
    }
}
